import VueRouter from 'vue-router'


// 导入组件
import homecontainer from './components/tabbar/HomeContainer.vue'
import shopcarcontainer from './components/tabbar/ShopcarContainer.vue'
import membercontainer from './components/tabbar/MemberContainer.vue'
import searchcontainer from './components/tabbar/SearchContainer.vue'
// 新闻
import newslist from './components/news/newslist.vue'
import newsinfo from './components/news/newsinfo.vue'


// 3. 创建路由对象
var router = new VueRouter({
  routes: [ // 目前这个路由是空的
    {path:'/',redirect:'/home'},
    {path:'/home',component:homecontainer},
    {path:'/member',component:membercontainer},
    {path:'/shopcar',component:shopcarcontainer},
    {path:'/search',component:searchcontainer},
    {path:'/home/newslist',component:newslist},
    {path:'/home/newslist/:id',component:newsinfo}
    
  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router